package com.unalm.examensustitutorio.util.entity;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the tb_detalle_notas database table.
 * 
 */
@Embeddable
public class EDetalleNotaPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="COD_ALUM")
	private String codAlum;

	@Column(name="COD_CURSO")
	private int codCurso;

    public EDetalleNotaPK() {
    }
	public String getCodAlum() {
		return this.codAlum;
	}
	public void setCodAlum(String codAlum) {
		this.codAlum = codAlum;
	}
	public int getCodCurso() {
		return this.codCurso;
	}
	public void setCodCurso(int codCurso) {
		this.codCurso = codCurso;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof EDetalleNotaPK)) {
			return false;
		}
		EDetalleNotaPK castOther = (EDetalleNotaPK)other;
		return 
			this.codAlum.equals(castOther.codAlum)
			&& (this.codCurso == castOther.codCurso);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.codAlum.hashCode();
		hash = hash * prime + this.codCurso;
		
		return hash;
    }
}